<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<jsp:include page="head.htm" />
<link rel="stylesheet" type="text/css" href="css/style1.css" />
</head>
<body onload='document.f.j_username.focus();'>
	<img src="images/hitch_banner.jpg"/>
	<div id="head">
		<h1>Hitch</h1>
	</div>
	<div id="content">
		<h2>
			<c:out value="${title}" />
		</h2>
		<p>
			<c:out value="${message}" />
		</p>

		<c:if test="${not empty error}">
			<div class="errorblock">
				Your login attempt was not successful, try again.<br /> Caused :
				${sessionScope["SPRING_SECURITY_LAST_EXCEPTION"].message}
			</div>
		</c:if>
		<c:url var="loginFormUrl" value="/loginProcess" />
		<form:form name="f" action="${loginFormUrl}"
			method="post">
			<fieldset>
				<div class="field">
					<div class="label">
						<label for="j_username"><fmt:message key="login.username" />:</label>
					</div>
					<div class="output">
						<input type="text" name="j_username" id="j_username"
							/>
					</div>
				</div>
				<div class="field">
					<div class="label">
						<label for="j_password"><fmt:message key="login.password" />:</label>
					</div>
					<div class="output">
						<input type="password" name="j_password" id="j_password" />
					</div>
				</div>
				<div class="field">
					<div class="label">
						<label for="remember_me"><fmt:message
								key="login.rememberMe" />:</label>
					</div>
					<div class="output">
						<input type="checkbox" name="_spring_security_remember_me"
							id="remember_me" />
					</div>
				</div>
				<div class="form-buttons">
					<div class="button">
						<input name="submit" id="submit" type="submit"
							value="<fmt:message key="button.login"/>" />
					</div>
				</div>
			</fieldset>
		</form:form>
		<a href="register.html">Register</a>

	</div>
</body>
</html>
